// app.js
App({
   //-----------全局的数据和方法-开始------------------
  nickName: "",
  avatarUrl: "",
  changeNickName(newNickName){
    this.nickName = newNickName,
    wx.setStorageSync('nickName', newNickName)
  },
  //------------全局的数据和方法-结束-----------------
  onLaunch(){
    this.nickName = wx.getStorageSync('nickName');
    this.avatarUrl = wx.getStorageSync('avatarUrl');
  }
})
